home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
QRZ! Ham Radio 8
/
QRZ Ham Radio Callsign Database - Volume 8.iso
/
pc
/
files
/
dsp
/
56000tar.z
/
56000tar
/
56000
/
fntns
/
sqrt3.hlp
< prev
next >
Wrap
Text File
|
1991-11-26
|
795b
|
22 lines
Name: SQRT3.ASM
Type: Assembler Macro
Version: 1.0
Last Change: 9-Feb-87
Description: Full Precision Square Root Macro
SQRT3 calculates the square root of an input number. The input
may be any 48 bit positive fraction, including zero. The input
number is assumed to be in Y (Y1:Y0) and the resulting square
root is returned in B.
The algorithm uses a successive approximation technique to
achieve full 23 bit precision in the result. Beginning with
the most significant bit, it sets each bit to form a best guess,
squares the guess and compares the result to the input number.
If the guess is too big, that bit is reset and the next least
significant bit is checked.
The library program SQRT3T provides an example of how to use the
SQRT3 macro.